package com.tiancheng.trade.order.service;

import com.tiancheng.trade.order.bo.cmq.TallyOrderServiceSuccessBO;
import com.tiancheng.trade.order.bo.notify.PayResultOrderBO;
import com.tiancheng.trade.order.enums.OrderActionTypeEnum;
import com.tiancheng.trade.order.model.RefundOrdersDetail;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 推送给对账中心的处理Service接口
 *
 * @author kellen
 * @date 2024/5/19
 */
public interface TallyService {

    /**
     * 核销子订单时
     *
     * @param verificationId 核销id
     * @param amount         核销金额
     * @param time           核销时间
     * @param subOrderId     子订单号
     * @return
     */
    boolean verification(String verificationId, Integer amount, LocalDateTime time, String subOrderId);

    /**
     * 退款成功时
     *
     * @param refundOrdersDetail
     * @return
     */
    boolean refund(RefundOrdersDetail refundOrdersDetail);

    /**
     * 支付成功时
     *
     * @param payNotifyBO
     * @return
     */
    boolean pay(PayResultOrderBO order);

    /**
     * @param actionTypeEnum action
     * @param orderId    main order id
     * @param subOrderIds    sub order id array
     * @param flowId
     * @return
     */
    boolean orderActionSend(OrderActionTypeEnum actionTypeEnum, String orderId, List<String> subOrderIds,String flowId);

    /**
     * 订单服务成功推送
     * @param orderServiceSuccessBO 订单信息
     * @return 推送结果
     */
    boolean orderServiceSuccess (TallyOrderServiceSuccessBO orderServiceSuccessBO);
}
